<!DOCTYPE>
  <SCRIPT LANGUAGE="JavaScript">
	function windowXY(){
		if(window.pageYOffset)return window.pageYOffset;
		else return document.documentElement.scrollTop;
	}
  </SCRIPT>
 <BODY>
  <div style='position:fixed;top:10px;right:10px;'><input type='button' onclick='alert(windowXY());'/></div>
  <div style='height:1000px;background-color:black;width:100px;'>&nbsp;</div>
 </BODY>

